<!DOCTYPE html>
<html lang="en">
    <head> </head>
    <body>
        <div
            id="maplegend"
            class="maplegend"
            style="
                position: fixed;
                z-index: 9999;
                border: 2px solid grey;
                background-color: rgba(255, 255, 255, 0.8);
                border-radius: 5px;
                padding: 10px;
                font-size: 14px;
                bottom: 20px;
                right: 5px;
            "
        >
            <div class="legend-title">Legend</div>
            <div class="legend-scale">
                <ul class="legend-labels">
                    <li>
                        <span style="background: red; opacity: 0.7"></span>Big
                    </li>
                    <li>
                        <span style="background: orange; opacity: 0.7"></span
                        >Medium
                    </li>
                    <li>
                        <span style="background: green; opacity: 0.7"></span
                        >Small
                    </li>
                </ul>
            </div>
        </div>
    </body>
</html>

<style type="text/css">
    .maplegend .legend-title {
        text-align: left;
        margin-bottom: 5px;
        font-weight: bold;
        font-size: 90%;
    }
    .maplegend .legend-scale ul {
        margin: 0;
        margin-bottom: 5px;
        padding: 0;
        float: left;
        list-style: none;
    }
    .maplegend .legend-scale ul li {
        font-size: 80%;
        list-style: none;
        margin-left: 0;
        line-height: 18px;
        margin-bottom: 2px;
    }
    .maplegend ul.legend-labels li span {
        display: block;
        float: left;
        height: 16px;
        width: 30px;
        margin-right: 5px;
        margin-left: 0;
        border: 1px solid #999;
    }
    .maplegend .legend-source {
        font-size: 80%;
        color: #777;
        clear: both;
    }
    .maplegend a {
        color: #777;
    }
</style>
